<template>
  <Row class="header" :class="state === '4'?'header1':''">
    <Col :span="state === '04'?10:16" class="header_user">当前用户：{{name}}</Col>
    <Col v-if="state ==='04'" span="6" class="header_yj">
      <span v-if="state ==='04'" @click="showApprove">查看审批意见</span>
    </Col>
    <Col span="8" class="header_back">
      <router-link :to="{ name: 'ApplyModule' }">返回菜单页</router-link>
    </Col>
  </Row>
</template>
<script>
  export default {
    data() {
      return {
        name: sessionStorage.getItem('username'),
        state: sessionStorage.getItem('state')
      }
    },
    methods: {
      showApprove() {
        this.$router.push({name: 'CompanyApproved'})
      }
    }
  }
 </script>
<style lang="scss" scoped>
.header1{
  font-size: .12rem;
}
  .header {
    color: #fff;
    line-height: 1.6rem;
    &_user {
      height: 1.6rem;
      background: url(../assets/img/top-ico1.png) no-repeat 0.54rem center #00b3ff;
      background-size: auto 0.6rem;
      padding-left: 1.4rem;
    }
    &_yj {
      height: 1.6rem;
      background: #107bbe;
      background-size: auto 0.6rem;
      padding-left: 0.5rem;
    }
    &_back {
      height: 1.6rem;
      background: url(../assets/img/top-back.png) no-repeat 3.5rem center #107bbe;
      background-size: auto 0.6rem;
      padding-left: 0.5rem;
      a {
        color: #fff;
      }
    }
  }

</style>
